# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=py3-progressbar2
_pkgname=progressbar2
pkgver=4.0.0
pkgrel=0
pkgdesc="Text progress bar library for Python"
url="https://github.com/WoLpH/python-progressbar"
arch="noarch !s390x" # py3-utils
license="BSD-3-Clause"
replaces="py-progressbar" # for backwards compatibility
provides="py-progressbar=$pkgver-r$pkgrel" # for backwards compatibility
depends="python3 py3-utils py3-freezegun"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pytest-cov"

source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"

builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD" pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
b9b9dabb3093e42bc6f40c0e284caae2d29ebfa450db379c214a5ae39e7ccb8c690655da21a44882d0b68f24d83f55a3342671087a25ada168bce9d236685666  progressbar2-4.0.0.tar.gz
"
